#ifdef WIN32

#include "WIndowsSocketCommon.h"

#include <WinSock2.h>
#include <cassert>

//CWindowsSocketContext::SOCKET CWindowsSocketContext::InvalidSocket= nullptr;

CWindowsSocketContext &CWindowsSocketContext::Get()
{
    static CWindowsSocketContext Instance;
    return Instance;
}

CWindowsSocketContext::CWindowsSocketContext()
{
    //Initialize Winsock
    WSADATA WSAData;
    auto err=WSAStartup(MAKEWORD(2, 2), &WSAData);

    assert(err == 0 && "WSAStartup failed");
}

CWindowsSocketContext::~CWindowsSocketContext()
{
    WSACleanup();
}


#endif